<template>
  <div>
    <el-table-column width="1px" />
    <el-table-column prop="date" label="序号" width="80" type="index" :index="indexMethod" />
    <el-table-column prop="taskCode" label="工单编号" />
    <el-table-column prop="innerCode" label="设备编号" />
    <el-table-column prop="taskType.typeName" label="工单类型" />
    <el-table-column prop="createType" label="工单方式" />
    <el-table-column prop="taskStatusTypeEntity.statusName" label="工单状态" />
    <el-table-column prop="userName" label="运营人员" />
    <el-table-column prop="createTime" label="创建日期" />
    <el-table-column prop="address" label="操作" width="100">
      <template slot-scope="scope">
        <el-button type="text" size="small" @click="handleFn(scope.row)">查看详情</el-button>
      </template>
    </el-table-column>
  </div>
</template>

<script>
export default {
  props: {
    pageIndex: {
      type: Number,
      default: () => 1
    }
  },
  methods: {
    indexMethod(index) {
      return this.pageIndex === 1 ? index + 1 : Number(`${this.pageIndex - 1}${index}`) + 1
    },
    handleFn(row) {
      console.log(row)
      this.$emit('handleClick', row)
    }
  }
}
</script>

<style>

</style>
